/*
 * Measurement.cpp
 *
 *  Created on: 06.12.2011
 *      Author: jan
 */

#include "Measurement.h"

namespace std {

Measurement::Measurement(vector<double> scan,vector<bool> wall, int grad, double startAngle, double finishAngle, double heading, double radius, double divlen, Point p):
	p(p),grad(grad),startAngle(startAngle),finishAngle(finishAngle),heading(heading),radius(radius),divlen(divlen),scan(scan),wall(wall)
{
	double degree = startAngle;
	for(unsigned int i = 0; i < scan.size(); i++,degree+=grad){
		double r = radians(heading+degree);
		double xk = scan[i] * cos(r);
		double yk = scan[i] * sin(r);
		points.push_back(Point(xk,yk));
	}
}

Measurement::~Measurement() {}

} /* namespace std */
